package converter.test.demo.entiy;

import converter.test.demo.coverter.enums.MyEnumValueName;
import lombok.Data;
import top.rish.converter.core.annotation.DesensitizedConverter;
import top.rish.converter.core.annotation.EnumConverter;
import top.rish.converter.core.annotation.Kv;
import top.rish.converter.core.annotation.KvConverter;
import top.rish.converter.core.base.DictEntity;
import top.rish.converter.core.desensitized.EmailDesensitizedAction;
import top.rish.converter.core.desensitized.PhoneDesensitizedAction;

import java.util.List;
import java.util.Map;

@Data
public class UserMember  implements DictEntity {

    @KvConverter({
            @Kv(k="1",v="男"),
            @Kv(k="0",v="女"),
    })
    public int sex;

    @EnumConverter(MyEnumValueName.class)
    public int tx;

    @DesensitizedConverter(EmailDesensitizedAction.class)
    public String email = "2225w@qq.com";

    @DesensitizedConverter(PhoneDesensitizedAction.class)
    public String phone = "1357759998";

    UserMember member;

    List<Object> memberObjs;

    Object[] memberObjArr;

    Map<String,Object> memberObjMap;

    Map<String,UserMember> memberMaps;
}
